<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body>
<?php
include_once("conn.php");
$kind=$_REQUEST['kind'];
$id=$_REQUEST['id'];
$name=$_REQUEST['name'];
$score=$_REQUEST['score'];
switch ($kind) {
    case 0:
        $sql = "SELECT * FROM course WHERE `id` = '$id'";
        break;
    case 1:
        $sql = "SELECT * FROM course WHERE `name` = '$name'";
        break;
    case 2:
        $sql = "SELECT * FROM course WHERE `score` = '$score'";
        break;
}

$result=mysql_query($sql);
while($row = mysql_fetch_row($result))
{
?>
  <table border="1" bordercolor="#ffffff" style="BORDER-COLLAPSE: collapse; color: #FFF"; width="50%" bgcolor="#6589d1" class="h">
  <tr style="text-align: center">
    <td width="21%">课程号</td>
    <td width="79%"><?=$row[0]?></td>
  </tr>
  <tr style="text-align: center">
    <td>课程名</td>
    <td><?=$row[1]?></td>
  </tr>
  <tr style="text-align: center">
    <td>学&nbsp;&nbsp;分</td>
    <td><?=$row[2]?></td>
  </tr>
  <tr style="text-align: center">
    <td>所属专业</td>
    <td><?=$row[3]?></td>
  </tr>
  <tr style="text-align: center">
    <td bgcolor="#FFFFFF">&nbsp;</td>
    <td bgcolor="#FFFFFF">&nbsp;</td>
  </tr>
  </table>
<?php
}
mysql_free_result($result);
mysql_close($conn);
?>
</body>
</html>